package base.IO流;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

public class text {
    public static void main(String[] args) throws IOException {
        File src = new File("D:\\蒂法mod适应配件.zip");
        File dest = new File("C:\\Users\\TUO\\Desktop");
        Charset ch = Charset.forName("GBK");

        /*对于解压会自动遍历zip文件所有路径*/
        ZipInputStream zip = new ZipInputStream(new FileInputStream(src),ch);
        ZipEntry entry;
        while ((entry = zip.getNextEntry()) != null){
            System.out.println(entry);
            System.out.println(zip);
        }
    }
}
